import { axios } from '@/utils/request'
/**
 * 模块api接口
*/

function getMailDetail () {
  return axios({
    url: '/user-service/smtp',
    method: 'get'
  })
}
function editMailDetail (data) {
  return axios({
    url: '/user-service/smtp',
    method: 'put',
    data
  })
}
// 分页查询邮件模板
function getEmailMessageTemplateList () {
  return axios({
    url: '/user-service/emailMessageTemplate/list',
    method: 'get'
  })
}
// 编辑邮件模板
function editEmailMessageTemplate (data) {
  return axios({
    url: '/user-service/emailMessageTemplate/edit',
    method: 'put',
    data
  })
}
// 根据id查询邮件模板详情
function getEmailMessageTemplateDetail (params) {
  return axios({
    url: '/user-service/emailMessageTemplate/detail',
    method: 'get',
    params
  })
}
// 批量删除邮件模板
function deleteEmailMessageTemplate (data) {
  return axios({
    url: '/user-service/emailMessageTemplate/delete',
    method: 'delete',
    data
  })
}
// 新增邮件模板
function addEmailMessageTemplate (data) {
  return axios({
    url: '/user-service/emailMessageTemplate/add',
    method: 'post',
    data
  })
}
// 获取业务归属类型
function getBusinessTypeList () {
  return axios({
    url: '/user-service/emailMessageTemplate/getBusinessType',
    method: 'get'
  })
}
export default {
  getMailDetail,
  editMailDetail,
  getEmailMessageTemplateList,
  editEmailMessageTemplate,
  getEmailMessageTemplateDetail,
  deleteEmailMessageTemplate,
  addEmailMessageTemplate,
  getBusinessTypeList
}
